<?php

include '../dao/productDetailDAO.php';

function getAllDetail() {
    return loadAllDetail();
}

function getDetailValue($proID, $detailID) {
    return loadDetailValue($proID, $detailID);
}

function addDetailValue($value, $detailID, $proID) {
    return insertDetailValue($value, $detailID, $proID);
}

function editDetailValue($value, $detailID, $proID) {
    return updateDetailValue($value, $detailID, $proID);
}

function countDetail() {
	return getNumberOfDetail();
}

function sLoadDetailList($search, $start_position, $row_per_page) {
	return loadDetailList($search, $start_position, $row_per_page);
}

function sDeleteAttribute($id) {
	return deleteAttribute($id);
}

function sLoadAttribute($id) {
	return loadAttribute($id);
}

function sAddAttribute($name, $type, $description, $sortOrder) {
	if (!isset($sortOrder) || $sortOrder == '') {
		$sortOrder = 0;
	}
	return addAttribute($name, $type, $description, $sortOrder);
}

function sUpdateAttribute($id, $name, $type, $description, $sortOrder) {
	if (!isset($sortOrder) || $sortOrder == '') {
		$sortOrder = 0;
	}
	return updateAttribute($id, $name, $type, $description, $sortOrder);
}

?>